﻿"""简单对话框"""
from tkinter.simpledialog import *
from tkinter import *

root = Tk()
root.geometry('800x600')


def test1():
    a = askinteger(title='输入年龄吧', prompt='年龄=?', initialvalue=18, minvalue=1, maxvalue=100)
    show['text'] = a


Button(root, text='老哥你多大了？请输入', command=test1).pack()
show = Label(root, width=100, height=50, bg='yellow')
show.pack()
root.mainloop()
